3.1093 \(\int \frac{1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2} \, dx\)

Optimal. Leaf size=271 \[ \frac{d \left (c^2+4 i c d+9 d^2\right )}{4 a^2 f (c-i d) (c+i d)^3 (c+d \tan (e+f x))}+\frac{x \left (-6 c^2 d^2+4 i c^3 d+c^4+12 i c d^3+9 d^4\right )}{4 a^2 (c-i d)^2 (c+i d)^4}-\frac{2 d^3 (2 c-i d) \log (c \cos (e+f x)+d \sin (e+f x))}{a^2 f (c-i d)^2 (c+i d)^4}+\frac{-4 d+i c}{4 a^2 f (c+i d)^2 (1+i \tan (e+f x)) (c+d \tan (e+f x))}-\frac{1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))} \]

[Out]

((c^4 + (4*I)*c^3*d - 6*c^2*d^2 + (12*I)*c*d^3 + 9*d^4)*x)/(4*a^2*(c - I*d)^2*(c + I*d)^4) - (2*(2*c - I*d)*d^
3*Log[c*Cos[e + f*x] + d*Sin[e + f*x]])/(a^2*(c - I*d)^2*(c + I*d)^4*f) + (d*(c^2 + (4*I)*c*d + 9*d^2))/(4*a^2
*(c - I*d)*(c + I*d)^3*f*(c + d*Tan[e + f*x])) + (I*c - 4*d)/(4*a^2*(c + I*d)^2*f*(1 + I*Tan[e + f*x])*(c + d*
Tan[e + f*x])) - 1/(4*(I*c - d)*f*(a + I*a*Tan[e + f*x])^2*(c + d*Tan[e + f*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.541269, antiderivative size = 271, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.179, Rules used = {3559, 3596, 3529, 3531, 3530} \[ \frac{d \left (c^2+4 i c d+9 d^2\right )}{4 a^2 f (c-i d) (c+i d)^3 (c+d \tan (e+f x))}+\frac{x \left (-6 c^2 d^2+4 i c^3 d+c^4+12 i c d^3+9 d^4\right )}{4 a^2 (c-i d)^2 (c+i d)^4}-\frac{2 d^3 (2 c-i d) \log (c \cos (e+f x)+d \sin (e+f x))}{a^2 f (c-i d)^2 (c+i d)^4}+\frac{-4 d+i c}{4 a^2 f (c+i d)^2 (1+i \tan (e+f x)) (c+d \tan (e+f x))}-\frac{1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))} \]

Antiderivative was successfully verified.

[In]

Int[1/((a + I*a*Tan[e + f*x])^2*(c + d*Tan[e + f*x])^2),x]

[Out]

((c^4 + (4*I)*c^3*d - 6*c^2*d^2 + (12*I)*c*d^3 + 9*d^4)*x)/(4*a^2*(c - I*d)^2*(c + I*d)^4) - (2*(2*c - I*d)*d^
3*Log[c*Cos[e + f*x] + d*Sin[e + f*x]])/(a^2*(c - I*d)^2*(c + I*d)^4*f) + (d*(c^2 + (4*I)*c*d + 9*d^2))/(4*a^2
*(c - I*d)*(c + I*d)^3*f*(c + d*Tan[e + f*x])) + (I*c - 4*d)/(4*a^2*(c + I*d)^2*f*(1 + I*Tan[e + f*x])*(c + d*
Tan[e + f*x])) - 1/(4*(I*c - d)*f*(a + I*a*Tan[e + f*x])^2*(c + d*Tan[e + f*x]))

Rule 3559

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim
p[(a*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n + 1))/(2*f*m*(b*c - a*d)), x] + Dist[1/(2*a*m*(b*c - a*d))
, Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[b*c*m - a*d*(2*m + n + 1) + b*d*(m + n + 1)*Tan
[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2
+ d^2, 0] && LtQ[m, 0] && (IntegerQ[m] || IntegersQ[2*m, 2*n])

Rule 3596

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[((a*A + b*B)*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n + 1))/(2
*f*m*(b*c - a*d)), x] + Dist[1/(2*a*m*(b*c - a*d)), Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Si
mp[A*(b*c*m - a*d*(2*m + n + 1)) + B*(a*c*m - b*d*(n + 1)) + d*(A*b - a*B)*(m + n + 1)*Tan[e + f*x], x], x], x
] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] &&  !GtQ[n,
0]

Rule 3529

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((
b*c - a*d)*(a + b*Tan[e + f*x])^(m + 1))/(f*(m + 1)*(a^2 + b^2)), x] + Dist[1/(a^2 + b^2), Int[(a + b*Tan[e +
f*x])^(m + 1)*Simp[a*c + b*d - (b*c - a*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c
 - a*d, 0] && NeQ[a^2 + b^2, 0] && LtQ[m, -1]

Rule 3531

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((a*c +
 b*d)*x)/(a^2 + b^2), x] + Dist[(b*c - a*d)/(a^2 + b^2), Int[(b - a*Tan[e + f*x])/(a + b*Tan[e + f*x]), x], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[a*c + b*d, 0]

Rule 3530

Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(c*Log[Re
moveContent[a*Cos[e + f*x] + b*Sin[e + f*x], x]])/(b*f), x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d,
0] && NeQ[a^2 + b^2, 0] && EqQ[a*c + b*d, 0]

Rubi steps

\begin{align*} \int \frac{1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2} \, dx &=-\frac{1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))}-\frac{\int \frac{-a (2 i c-5 d)-3 i a d \tan (e+f x)}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))^2} \, dx}{4 a^2 (i c-d)}\\ &=\frac{i c-4 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))}-\frac{1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))}-\frac{\int \frac{-2 a^2 \left (c^2+4 i c d-9 d^2\right )-4 a^2 (c+4 i d) d \tan (e+f x)}{(c+d \tan (e+f x))^2} \, dx}{8 a^4 (c+i d)^2}\\ &=\frac{d \left (c^2+4 i c d+9 d^2\right )}{4 a^2 (c+i d)^2 \left (c^2+d^2\right ) f (c+d \tan (e+f x))}+\frac{i c-4 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))}-\frac{1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))}-\frac{\int \frac{-2 a^2 \left (c^3+4 i c^2 d-7 c d^2+8 i d^3\right )-2 a^2 d \left (c^2+4 i c d+9 d^2\right ) \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{8 a^4 (c+i d)^2 \left (c^2+d^2\right )}\\ &=\frac{\left (c^4+4 i c^3 d-6 c^2 d^2+12 i c d^3+9 d^4\right ) x}{4 a^2 (c+i d)^2 \left (c^2+d^2\right )^2}+\frac{d \left (c^2+4 i c d+9 d^2\right )}{4 a^2 (c+i d)^2 \left (c^2+d^2\right ) f (c+d \tan (e+f x))}+\frac{i c-4 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))}-\frac{1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))}-\frac{\left (2 (2 c-i d) d^3\right ) \int \frac{d-c \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{a^2 (c+i d)^2 \left (c^2+d^2\right )^2}\\ &=\frac{\left (c^4+4 i c^3 d-6 c^2 d^2+12 i c d^3+9 d^4\right ) x}{4 a^2 (c+i d)^2 \left (c^2+d^2\right )^2}-\frac{2 (2 c-i d) d^3 \log (c \cos (e+f x)+d \sin (e+f x))}{a^2 (c+i d)^2 \left (c^2+d^2\right )^2 f}+\frac{d \left (c^2+4 i c d+9 d^2\right )}{4 a^2 (c+i d)^2 \left (c^2+d^2\right ) f (c+d \tan (e+f x))}+\frac{i c-4 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))}-\frac{1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))}\\ \end{align*}

Mathematica [A]  time = 3.56897, size = 476, normalized size = 1.76 \[ \frac{\sec ^2(e+f x) (\cos (f x)+i \sin (f x))^2 \left (-\frac{32 i d^3 (2 c-i d) (\cos (e)+i \sin (e))^2 \tan ^{-1}\left (\frac{\left (d^2-c^2\right ) \sin (f x)-2 c d \cos (f x)}{\left (c^2-d^2\right ) \cos (f x)-2 c d \sin (f x)}\right )}{f (c-i d)^2}+\frac{4 x \left (-6 c^2 d^2+4 i c^3 d+c^4+12 i c d^3+9 d^4\right ) (\cos (2 e)+i \sin (2 e))}{(c-i d)^2}-\frac{16 d^4 (c+i d) (\cos (2 e)+i \sin (2 e)) \sin (f x)}{f (c-i d) (c \cos (e)+d \sin (e)) (c \cos (e+f x)+d \sin (e+f x))}-\frac{16 d^3 (2 c-i d) (\cos (e)+i \sin (e))^2 \log \left ((c \cos (e+f x)+d \sin (e+f x))^2\right )}{f (c-i d)^2}+\frac{32 d^3 x (2 c-i d) (\sin (2 e)-i \cos (2 e))}{(c-i d)^2}+\frac{(c+i d)^2 (\sin (2 e)+i \cos (2 e)) \cos (4 f x)}{f}+\frac{(c+i d)^2 (\cos (2 e)-i \sin (2 e)) \sin (4 f x)}{f}+\frac{4 (c+i d) (c+3 i d) \sin (2 f x)}{f}+\frac{4 i (c+i d) (c+3 i d) \cos (2 f x)}{f}\right )}{16 (c+i d)^4 (a+i a \tan (e+f x))^2} \]

Antiderivative was successfully verified.

[In]

Integrate[1/((a + I*a*Tan[e + f*x])^2*(c + d*Tan[e + f*x])^2),x]

[Out]

(Sec[e + f*x]^2*(Cos[f*x] + I*Sin[f*x])^2*(((4*I)*(c + I*d)*(c + (3*I)*d)*Cos[2*f*x])/f - ((32*I)*(2*c - I*d)*
d^3*ArcTan[(-2*c*d*Cos[f*x] + (-c^2 + d^2)*Sin[f*x])/((c^2 - d^2)*Cos[f*x] - 2*c*d*Sin[f*x])]*(Cos[e] + I*Sin[
e])^2)/((c - I*d)^2*f) - (16*(2*c - I*d)*d^3*Log[(c*Cos[e + f*x] + d*Sin[e + f*x])^2]*(Cos[e] + I*Sin[e])^2)/(
(c - I*d)^2*f) + (4*(c^4 + (4*I)*c^3*d - 6*c^2*d^2 + (12*I)*c*d^3 + 9*d^4)*x*(Cos[2*e] + I*Sin[2*e]))/(c - I*d
)^2 + (32*(2*c - I*d)*d^3*x*((-I)*Cos[2*e] + Sin[2*e]))/(c - I*d)^2 + ((c + I*d)^2*Cos[4*f*x]*(I*Cos[2*e] + Si
n[2*e]))/f + (4*(c + I*d)*(c + (3*I)*d)*Sin[2*f*x])/f + ((c + I*d)^2*(Cos[2*e] - I*Sin[2*e])*Sin[4*f*x])/f - (
16*(c + I*d)*d^4*(Cos[2*e] + I*Sin[2*e])*Sin[f*x])/((c - I*d)*f*(c*Cos[e] + d*Sin[e])*(c*Cos[e + f*x] + d*Sin[
e + f*x]))))/(16*(c + I*d)^4*(a + I*a*Tan[e + f*x])^2)

________________________________________________________________________________________

Maple [A]  time = 0.061, size = 465, normalized size = 1.7 \begin{align*}{\frac{-{\frac{i}{8}}\ln \left ( \tan \left ( fx+e \right ) -i \right ){c}^{2}}{f{a}^{2} \left ( c+id \right ) ^{4}}}+{\frac{{\frac{17\,i}{8}}\ln \left ( \tan \left ( fx+e \right ) -i \right ){d}^{2}}{f{a}^{2} \left ( c+id \right ) ^{4}}}+{\frac{3\,\ln \left ( \tan \left ( fx+e \right ) -i \right ) cd}{4\,f{a}^{2} \left ( c+id \right ) ^{4}}}+{\frac{{\frac{3\,i}{2}}cd}{f{a}^{2} \left ( c+id \right ) ^{4} \left ( \tan \left ( fx+e \right ) -i \right ) }}+{\frac{{c}^{2}}{4\,f{a}^{2} \left ( c+id \right ) ^{4} \left ( \tan \left ( fx+e \right ) -i \right ) }}-{\frac{5\,{d}^{2}}{4\,f{a}^{2} \left ( c+id \right ) ^{4} \left ( \tan \left ( fx+e \right ) -i \right ) }}-{\frac{{\frac{i}{4}}{c}^{2}}{f{a}^{2} \left ( c+id \right ) ^{4} \left ( \tan \left ( fx+e \right ) -i \right ) ^{2}}}+{\frac{{\frac{i}{4}}{d}^{2}}{f{a}^{2} \left ( c+id \right ) ^{4} \left ( \tan \left ( fx+e \right ) -i \right ) ^{2}}}+{\frac{cd}{2\,f{a}^{2} \left ( c+id \right ) ^{4} \left ( \tan \left ( fx+e \right ) -i \right ) ^{2}}}+{\frac{{\frac{i}{8}}\ln \left ( \tan \left ( fx+e \right ) +i \right ) }{f{a}^{2} \left ( id-c \right ) ^{2}}}+{\frac{{d}^{3}{c}^{2}}{f{a}^{2} \left ( id-c \right ) ^{2} \left ( c+id \right ) ^{4} \left ( c+d\tan \left ( fx+e \right ) \right ) }}+{\frac{{d}^{5}}{f{a}^{2} \left ( id-c \right ) ^{2} \left ( c+id \right ) ^{4} \left ( c+d\tan \left ( fx+e \right ) \right ) }}+{\frac{2\,i{d}^{4}\ln \left ( c+d\tan \left ( fx+e \right ) \right ) }{f{a}^{2} \left ( id-c \right ) ^{2} \left ( c+id \right ) ^{4}}}-4\,{\frac{{d}^{3}\ln \left ( c+d\tan \left ( fx+e \right ) \right ) c}{f{a}^{2} \left ( id-c \right ) ^{2} \left ( c+id \right ) ^{4}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+I*a*tan(f*x+e))^2/(c+d*tan(f*x+e))^2,x)

[Out]

-1/8*I/f/a^2/(c+I*d)^4*ln(tan(f*x+e)-I)*c^2+17/8*I/f/a^2/(c+I*d)^4*ln(tan(f*x+e)-I)*d^2+3/4/f/a^2/(c+I*d)^4*ln
(tan(f*x+e)-I)*c*d+3/2*I/f/a^2/(c+I*d)^4/(tan(f*x+e)-I)*c*d+1/4/f/a^2/(c+I*d)^4/(tan(f*x+e)-I)*c^2-5/4/f/a^2/(
c+I*d)^4/(tan(f*x+e)-I)*d^2-1/4*I/f/a^2/(c+I*d)^4/(tan(f*x+e)-I)^2*c^2+1/4*I/f/a^2/(c+I*d)^4/(tan(f*x+e)-I)^2*
d^2+1/2/f/a^2/(c+I*d)^4/(tan(f*x+e)-I)^2*c*d+1/8*I/f/a^2/(I*d-c)^2*ln(tan(f*x+e)+I)+1/f/a^2*d^3/(I*d-c)^2/(c+I
*d)^4/(c+d*tan(f*x+e))*c^2+1/f/a^2*d^5/(I*d-c)^2/(c+I*d)^4/(c+d*tan(f*x+e))+2*I/f/a^2*d^4/(I*d-c)^2/(c+I*d)^4*
ln(c+d*tan(f*x+e))-4/f/a^2*d^3/(I*d-c)^2/(c+I*d)^4*ln(c+d*tan(f*x+e))*c

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^2/(c+d*tan(f*x+e))^2,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [B]  time = 1.8254, size = 1229, normalized size = 4.54 \begin{align*} \frac{c^{5} + i \, c^{4} d + 2 \, c^{3} d^{2} + 2 i \, c^{2} d^{3} + c d^{4} + i \, d^{5} +{\left (-4 i \, c^{5} + 12 \, c^{4} d + 8 i \, c^{3} d^{2} + 136 \, c^{2} d^{3} - 180 i \, c d^{4} - 68 \, d^{5}\right )} f x e^{\left (6 i \, f x + 6 i \, e\right )} +{\left (4 \, c^{5} + 4 i \, c^{4} d + 24 \, c^{3} d^{2} - 8 i \, c^{2} d^{3} - 12 \, c d^{4} - 44 i \, d^{5} +{\left (-4 i \, c^{5} + 20 \, c^{4} d + 40 i \, c^{3} d^{2} + 88 \, c^{2} d^{3} + 44 i \, c d^{4} + 68 \, d^{5}\right )} f x\right )} e^{\left (4 i \, f x + 4 i \, e\right )} +{\left (5 \, c^{5} + 11 i \, c^{4} d + 10 \, c^{3} d^{2} + 22 i \, c^{2} d^{3} + 5 \, c d^{4} + 11 i \, d^{5}\right )} e^{\left (2 i \, f x + 2 i \, e\right )} +{\left ({\left (64 i \, c^{2} d^{3} + 96 \, c d^{4} - 32 i \, d^{5}\right )} e^{\left (6 i \, f x + 6 i \, e\right )} +{\left (64 i \, c^{2} d^{3} - 32 \, c d^{4} + 32 i \, d^{5}\right )} e^{\left (4 i \, f x + 4 i \, e\right )}\right )} \log \left (\frac{{\left (i \, c + d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d}{i \, c + d}\right )}{{\left (-16 i \, a^{2} c^{7} + 16 \, a^{2} c^{6} d - 48 i \, a^{2} c^{5} d^{2} + 48 \, a^{2} c^{4} d^{3} - 48 i \, a^{2} c^{3} d^{4} + 48 \, a^{2} c^{2} d^{5} - 16 i \, a^{2} c d^{6} + 16 \, a^{2} d^{7}\right )} f e^{\left (6 i \, f x + 6 i \, e\right )} +{\left (-16 i \, a^{2} c^{7} + 48 \, a^{2} c^{6} d + 16 i \, a^{2} c^{5} d^{2} + 80 \, a^{2} c^{4} d^{3} + 80 i \, a^{2} c^{3} d^{4} + 16 \, a^{2} c^{2} d^{5} + 48 i \, a^{2} c d^{6} - 16 \, a^{2} d^{7}\right )} f e^{\left (4 i \, f x + 4 i \, e\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^2/(c+d*tan(f*x+e))^2,x, algorithm="fricas")

[Out]

(c^5 + I*c^4*d + 2*c^3*d^2 + 2*I*c^2*d^3 + c*d^4 + I*d^5 + (-4*I*c^5 + 12*c^4*d + 8*I*c^3*d^2 + 136*c^2*d^3 -
180*I*c*d^4 - 68*d^5)*f*x*e^(6*I*f*x + 6*I*e) + (4*c^5 + 4*I*c^4*d + 24*c^3*d^2 - 8*I*c^2*d^3 - 12*c*d^4 - 44*
I*d^5 + (-4*I*c^5 + 20*c^4*d + 40*I*c^3*d^2 + 88*c^2*d^3 + 44*I*c*d^4 + 68*d^5)*f*x)*e^(4*I*f*x + 4*I*e) + (5*
c^5 + 11*I*c^4*d + 10*c^3*d^2 + 22*I*c^2*d^3 + 5*c*d^4 + 11*I*d^5)*e^(2*I*f*x + 2*I*e) + ((64*I*c^2*d^3 + 96*c
*d^4 - 32*I*d^5)*e^(6*I*f*x + 6*I*e) + (64*I*c^2*d^3 - 32*c*d^4 + 32*I*d^5)*e^(4*I*f*x + 4*I*e))*log(((I*c + d
)*e^(2*I*f*x + 2*I*e) + I*c - d)/(I*c + d)))/((-16*I*a^2*c^7 + 16*a^2*c^6*d - 48*I*a^2*c^5*d^2 + 48*a^2*c^4*d^
3 - 48*I*a^2*c^3*d^4 + 48*a^2*c^2*d^5 - 16*I*a^2*c*d^6 + 16*a^2*d^7)*f*e^(6*I*f*x + 6*I*e) + (-16*I*a^2*c^7 +
48*a^2*c^6*d + 16*I*a^2*c^5*d^2 + 80*a^2*c^4*d^3 + 80*I*a^2*c^3*d^4 + 16*a^2*c^2*d^5 + 48*I*a^2*c*d^6 - 16*a^2
*d^7)*f*e^(4*I*f*x + 4*I*e))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))**2/(c+d*tan(f*x+e))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.41262, size = 671, normalized size = 2.48 \begin{align*} \frac{2 \,{\left (\frac{{\left (c^{2} + 6 i \, c d - 17 \, d^{2}\right )} \log \left (i \, \tan \left (f x + e\right ) + 1\right )}{16 i \, a^{2} c^{4} - 64 \, a^{2} c^{3} d - 96 i \, a^{2} c^{2} d^{2} + 64 \, a^{2} c d^{3} + 16 i \, a^{2} d^{4}} - \frac{{\left (2 \, c d^{4} - i \, d^{5}\right )} \log \left ({\left | d \tan \left (f x + e\right ) + c \right |}\right )}{a^{2} c^{6} d + 2 i \, a^{2} c^{5} d^{2} + a^{2} c^{4} d^{3} + 4 i \, a^{2} c^{3} d^{4} - a^{2} c^{2} d^{5} + 2 i \, a^{2} c d^{6} - a^{2} d^{7}} - \frac{\log \left (-i \, \tan \left (f x + e\right ) + 1\right )}{16 i \, a^{2} c^{2} + 32 \, a^{2} c d - 16 i \, a^{2} d^{2}} + \frac{4 \, c d^{4} \tan \left (f x + e\right ) - 2 i \, d^{5} \tan \left (f x + e\right ) + 5 \, c^{2} d^{3} - 2 i \, c d^{4} + d^{5}}{{\left (2 \, a^{2} c^{6} + 4 i \, a^{2} c^{5} d + 2 \, a^{2} c^{4} d^{2} + 8 i \, a^{2} c^{3} d^{3} - 2 \, a^{2} c^{2} d^{4} + 4 i \, a^{2} c d^{5} - 2 \, a^{2} d^{6}\right )}{\left (d \tan \left (f x + e\right ) + c\right )}} - \frac{3 \, c^{2} \tan \left (f x + e\right )^{2} + 18 i \, c d \tan \left (f x + e\right )^{2} - 51 \, d^{2} \tan \left (f x + e\right )^{2} - 10 i \, c^{2} \tan \left (f x + e\right ) + 60 \, c d \tan \left (f x + e\right ) + 122 i \, d^{2} \tan \left (f x + e\right ) - 11 \, c^{2} - 50 i \, c d + 75 \, d^{2}}{{\left (32 i \, a^{2} c^{4} - 128 \, a^{2} c^{3} d - 192 i \, a^{2} c^{2} d^{2} + 128 \, a^{2} c d^{3} + 32 i \, a^{2} d^{4}\right )}{\left (\tan \left (f x + e\right ) - i\right )}^{2}}\right )}}{f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^2/(c+d*tan(f*x+e))^2,x, algorithm="giac")

[Out]

2*((c^2 + 6*I*c*d - 17*d^2)*log(I*tan(f*x + e) + 1)/(16*I*a^2*c^4 - 64*a^2*c^3*d - 96*I*a^2*c^2*d^2 + 64*a^2*c
*d^3 + 16*I*a^2*d^4) - (2*c*d^4 - I*d^5)*log(abs(d*tan(f*x + e) + c))/(a^2*c^6*d + 2*I*a^2*c^5*d^2 + a^2*c^4*d
^3 + 4*I*a^2*c^3*d^4 - a^2*c^2*d^5 + 2*I*a^2*c*d^6 - a^2*d^7) - log(-I*tan(f*x + e) + 1)/(16*I*a^2*c^2 + 32*a^
2*c*d - 16*I*a^2*d^2) + (4*c*d^4*tan(f*x + e) - 2*I*d^5*tan(f*x + e) + 5*c^2*d^3 - 2*I*c*d^4 + d^5)/((2*a^2*c^
6 + 4*I*a^2*c^5*d + 2*a^2*c^4*d^2 + 8*I*a^2*c^3*d^3 - 2*a^2*c^2*d^4 + 4*I*a^2*c*d^5 - 2*a^2*d^6)*(d*tan(f*x +
e) + c)) - (3*c^2*tan(f*x + e)^2 + 18*I*c*d*tan(f*x + e)^2 - 51*d^2*tan(f*x + e)^2 - 10*I*c^2*tan(f*x + e) + 6
0*c*d*tan(f*x + e) + 122*I*d^2*tan(f*x + e) - 11*c^2 - 50*I*c*d + 75*d^2)/((32*I*a^2*c^4 - 128*a^2*c^3*d - 192
*I*a^2*c^2*d^2 + 128*a^2*c*d^3 + 32*I*a^2*d^4)*(tan(f*x + e) - I)^2))/f